<?php
class ErrorController extends Controller{
public function actionIndex()
	{
	    if($error=Yii::app()->errorHandler->error)
	    {
	    	if(Yii::app()->request->isAjaxRequest)
	    		echo $error['message'];
	    	else
	        	$this->render('index', array('error'=>$error));
	    }
	    yii::log('*********************** show bien error'.$error['code']);
	}
}